package com.zy.chat.vo;

import com.zy.chat.entity.UserInfo;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.List;

@Data
@NoArgsConstructor
public class UserDoc {

    private Integer id;
    private String userId;
    private String username;
    private String password;
    private String avatarUrl;
    private List<String> suggestion;

    public UserDoc(UserInfo userInfo) {
        this.id = userInfo.getId();
        this.userId = userInfo.getUserId();
        this.username = userInfo.getUsername();
        this.password = userInfo.getPassword();
        this.avatarUrl = userInfo.getAvatarUrl();
        this.suggestion = new ArrayList<>();
        this.suggestion.add(this.username);

    }
}
